package com.freshmarket.freshmarket.controller.form;

import lombok.Data;
import org.springframework.validation.annotation.Validated;

import javax.validation.Valid;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;

@Data
@Validated
public class InsertProductForm {
    @NotEmpty
    String productName;
    @Min(1)
    double productPrice;
    @Min(1)
    int productNum;
    @NotEmpty
    String productExpireTime;
    @NotEmpty
    String source;
    @Min(1)
    int productTypeId;
    @NotEmpty
    String productImg;
}
